package com.codeZ.DecoratorPattern;

/**
 * 装抽象饰者类
 *
 * @author codeZhang
 * @Date 2024/8/14 09:49
 */
public class DataLoaderDecorator implements DataLoader{

    private final DataLoader wrapper;

    public DataLoaderDecorator(DataLoader wrapper) {
        this.wrapper = wrapper;
    }

    @Override
    public String read() {
        return wrapper.read();
    }

    @Override
    public void write(String data) {
        wrapper.write(data);
    }

}
